<template>
  <el-upload
    v-model:file-list="fileList"
    list-type="picture-card"
    :show-upload-list="false"
    :before-upload="beforeUpload"
    @change="handleChange"
  >
    <img
      v-if="imageUrl"
      :src="imageUrl"
      alt="avatar"
    >
    <div v-else>
      <loading-outlined v-if="loading" />
      <plus-outlined v-else />
      <div class="ant-upload-text">上传</div>
    </div>
  </el-upload>
</template>

<script setup>
import { ref, reactive } from 'vue'
const loading = ref(false)
const imageUrl = ref(null)
const fileList = reactive([])
const beforeUpload = () => {}
const handleChange = () => {}
</script>

<style lang="scss" scoped></style>
